<?php
/**
 * Clase encargada de encapsultar las configuraciones del sistema.
 * 
 * @author Willy A. Kuster
 */
class Conf {
	
	private static $config = null;
	
	public static function get(array $args) {
		if(self::$config==null) {
			require_once "amicitia.conf.php";
			self::$config = $config;
		}
		
		$params = "";
	    foreach ($args as $param) {
	    	$params .= "['".preg_replace("/[^A-Za-z0-9_]/","",$param)."']";
	    }
	    
	    $config = self::$config;
	    $valor = "";
	    eval("\$valor=\$config".$params.";");
	    return $valor;
	}
	
}

function conf() {
	return Conf::get(func_get_args());
}
?>